<?php
require $_SERVER['DOCUMENT_ROOT'].'/../_core/common.php';

//权限验证
if( Role::init() == false ){
	exit('没有权限');
}

require $_SERVER['DOCUMENT_ROOT'].'/../_interface/name.php';

$db = new DB('news');

$title_id = isset($_GET['title_id']) ? h($_GET['title_id']) : 0;
$empty_id = isset($_GET['empty_id']) ? h($_GET['empty_id']) : '';//是否是空白新闻

$news_sql = 'select title_id,category_id,title,url,empty_id from news where title_id="'.$title_id.'" and is_del=1 and empty_id="'.$empty_id.'" limit 1';
$news_rs = $db->query($news_sql)->getOne();

$category_id = $news_rs['category_id'];//当前栏目id	
$this_category_name = Name::get_catename($db, $category_id);//当前栏目名称

//记录动作日志
Log::logs_articles($category_id, 3, $news_rs['title_id'], $news_rs['title']);

require template('admin/news/empty_edit');
exit;